      <div class="templatemo-content-wrapper">
        <div class="templatemo-content">
         <ul class="nav nav-tabs mytabs">
      		   <li class="active"><a href="<?php echo site_url('admin/index/id/'.$admin['id'])?>">编辑管理员</a></li>
      		  <li><a href="<?=site_url()?>/admin/index">管理员列表</a></li>
      		  <li><a href="<?=site_url()?>/admin/add">添加管理员</a></li>
      		</ul>
          <div class="row">
            <div class="col-md-12" style="padding-top:30px;">
              <form class="form-horizontal col-md-7" id="form-edit">
      	        <input type="hidden" name="id" id="id" value="<?=$admin['id']?>" />
      	        <?=form_input('用户名', 'username', $admin, true, '')?>
      					<?=form_input('姓名', 'name', $admin, true, '')?>
                <?=form_input('手机号', 'cellphone', $admin, false, '')?>
                <?=form_input('密码', 'password', '', false, '', 'password')?>

                <div class="form-group">
                  <label class="col-sm-3 control-label"> </label>
                  <div class="col-sm-9">不修改密码请留空</div></div>


                <?=form_select('绑定套餐', 'categoryid', $admin, $categories, false, 'id', 'name')?>
                <div class="form-group">
      	          <div class="col-sm-offset-3 col-sm-10">
      	            <button type="button" class="btn btn-primary" id="submit-edit">保 存</button>
      	          </div>
      	        </div>
              </form>
            </div>
          </div>
        </div>
      </div>
<script>
	$(document).ready(function() {
    var formedit = new dform.create('#form-edit', '#submit-edit')

    $('#submit-edit').click(function(){
    	formedit.submit(function(data){
    		drqt.post('<?php echo site_url('admin/update')?>', data, function(data){
    			formedit.reset()//.clean()
    			//dtoast.success(data.msg)
    			//if(data.code)
    			   dtoast.success(data.msg)
    		})
    	})
    })


	});
</script>
